home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / pxfstat.z / pxfstat
Encoding:
Text File  |  1998-10-30  |  4.3 KB  |  108 lines

  1. PXFSTAT(3F)                                            Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      PPXXFFSSTTAATT - Retrieves the file status
  6.  
  7. SSYYNNOOPPSSIISS
  8.      IINNTTEEGGEERR _j_s_t_a_t,, _i_l_e_n,, _i_e_r_r_o_r
  9.      CCAALLLL PPXXFFSSTTAATT((_p_a_t_h,, _i_l_e_n,, _j_s_t_a_t,, _i_e_r_r_o_r))
  10.  
  11. IIMMPPLLEEMMEENNTTAATTIIOONN
  12.      UNICOS, UNICOS/mk, and IRIX systems
  13.  
  14. SSTTAANNDDAARRDDSS
  15.      IEEE standard interface for FORTRAN 77
  16.  
  17. DDEESSCCRRIIPPTTIIOONN
  18.      On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
  19.      default when compiling programs with the MIPSpro 7 Fortran 90 compiler
  20.      or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
  21.      7.2 F77 compiler.
  22.  
  23.      The PPXXFFSSTTAATT routine uses the ssttaatt system call to get the file status.
  24.  
  25.      When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
  26.      UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
  27.      kind unless documented otherwise.  On UNICOS and UNICOS/mk, default
  28.      kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
  29.      IRIX, the default kind is KKIINNDD==44.
  30.  
  31.      The following is a list of arguments for this routine:
  32.  
  33.      _p_a_t_h    An input character variable or array element containing the
  34.              name of a file.
  35.  
  36.      _i_l_e_n    An input integer variable containing the length of _p_a_t_h in
  37.              characters.  If _i_l_e_n is zero, all trailing blanks are removed
  38.              before calling ssttaatt().
  39.  
  40.      _j_s_t_a_t   An input integer variable or array element containing a handle
  41.              for a stat structure.  This handle should have been created by
  42.              a call to the PPXXFFSSTTRRUUCCTTCCRREEAATTEE(3F) routine.
  43.  
  44.      _i_e_r_r_o_r  An output integer variable that contains the status:
  45.  
  46.              Zero    PPXXFFSSTTAATT returned the status information.
  47.  
  48.              Nonzero PPXXFFSSTTAATT was unable to return the status.
  49.  
  50.      In addition to errors returned by the ssttaatt(2) system call, the
  51.      following errors may occur:
  52.  
  53.      EEIINNVVAALL       If _i_l_e_n < 0 or _i_l_e_n > LLEENN((_p_a_t_h)).
  54.  
  55.      EENNOOMMEEMM       If PPXXFFSSTTAATT is unable to obtain memory to copy _p_a_t_h.
  56.  
  57.      EEBBAADDHHAANNDDLLEE   If _j_s_t_a_t is an invalid handle or has an incorrect handle
  58.                   type (UNICOS and UNICOS/mk systems only).
  59.  
  60.      The ssttaatt structure contains the following components:
  61.  
  62.      * sstt__mmooddee:  File mode.
  63.  
  64.      * sstt__iinnoo:  File serial number.
  65.  
  66.      * sstt__ddeevv:  ID of device containing the file.
  67.  
  68.      * sstt__nnlliinnkk:  Number of links.
  69.  
  70.      * sstt__uuiidd:  User id of the owner of the file.
  71.  
  72.      * sstt__ggiidd:  Group id of the owner of the file.
  73.  
  74.      * sstt__ssiizzee:  File size in bytes for regular files.  Unspecified for
  75.        other files.
  76.  
  77.      * sstt__aattiimmee:  Last time that data within the file was accessed.
  78.  
  79.      * sstt__mmttiimmee:  Last time that data in the file was modified.
  80.  
  81.      * sstt__ccttiimmee:  Last time that file status was changed.
  82.  
  83. EEXXAAMMPPLLEESS
  84.           program test
  85.           character*10 path
  86.           integer ilen, jstat, ierr,imode, istino
  87.           path = 'stt.f'
  88.           call pxfstructcreate('stat',jstat,ierr)
  89.              print *,'structcreate error = ',ierr
  90.           ilen=0
  91.           call pxfstat(path, ilen, jstat, ierr)
  92.           if (ierr.ne.0) then
  93.              print *,'FAIL: error from pxfstat = ',ierr
  94.           else
  95.              print *,'PASS: No error from pxfstat = '
  96.           endif
  97.           call pxfintget(jstat,'st_ino',istino,ierr)
  98.           call pxfintget(jstat,'mode',imode,ierr)
  99.           print *,'st_ino = ',istino
  100.           print *,'mode = ',imode
  101.           call pxfstructfree(stat,ierr)
  102.           end
  103.  
  104. SSEEEE AALLSSOO
  105.      _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
  106.      2165, for the printed version of this man page.
  107.  
  108.